home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Games / talesdemo / rexx / GenesisOnline.rexx < prev    next >
OS/2 REXX Batch file  |  2002-07-22  |  4KB  |  97 lines

  1. /******************************************************************************************************/
  2. /* Online-Script für Genesis mit Arexx                                                                */
  3. /*     © by Martin Wolf / Eternity Hard & Software                                                  */
  4. /*                                                                                      */
  5. /*                                                                                                    */
  6. /*      First Bit set: 22.10.1998                                                                     */
  7. /*      Last Bit set : 22.07.2002                                                                     */
  8. /*                                                                                                    */
  9. /*      Version 1.00 : Erste Version aus der grauen Vergangenheit                                     */
  10. /*      Version 1.01 : Undokumentierte Befehle eingebaut                                              */
  11. /*                                                                                                    */
  12. /******************************************************************************************************/
  13.  
  14.  
  15. /* ACHTUNG Wichtig ! Bis zur Genesis-Version 1.06 ist der Arexx-Port extrem buggy. Deshalb            */
  16. /*                   dieses Script nur mit einem Interface names PPP (also Modem-Config)              */
  17.  
  18.  
  19. InterfaceName ='PPP'  /* Setze hier deinen Interface-Namen / Put in your preferred InterfaceName here */
  20.  
  21.  
  22. OPTIONS RESULTS
  23. OPTIONS FAILAT 31
  24. SIGNAL ON ERROR
  25.  
  26. ADDRESS COMMAND
  27.     'SetEnv ToT:Data/TOT_ONLINE 0'                /* Genesis-EnvVar resetten             */
  28.     counter_MW=0
  29.     DO UNTIL SHOW('P','GENESIS')                /* Auf Genesis warten                  */
  30.       SIGNAL OFF ERROR
  31.       'WaitForPort GENESIS'
  32.       SIGNAL ON ERROR
  33.       IF counter_MW=3 THEN EXIT    
  34.       counter_MW=counter_MW+1
  35.     END
  36.      IF SHOW('P','GENESIS') THEN
  37.     DO
  38.       'SetEnv ToT:Data/TOT_ONLINE 1'                /* Genesis-Port wurde gefunden         */
  39.       genesisport = GENESIS                    /* ist auf jeden Fall der aktive Port  */
  40.     END
  41.     IF ~SHOW('P','GENESIS') THEN
  42.     DO
  43.       'SetEnv ToT:Data/TOT_ONLINE -1'                /* Konnte Genesis nicht finden         */
  44.       EXIT
  45.     END        
  46.  
  47. ADDRESS (genesisport)
  48.     SIGNAL OFF ERROR
  49.      ISONLINE InterfaceName
  50.     SIGNAL ON ERROR
  51.     status_MW=rc
  52.  
  53.     IF (status_MW=0) THEN
  54.     DO
  55.       SIGNAL OFF ERROR
  56.       ONLINE InterfaceName
  57.       DO FOREVER                         /*warten für den LogIN                 */
  58.         ISONLINE InterfaceName
  59.         status_MW=rc
  60.         IF status_MW=1 THEN LEAVE
  61.         IF status_MW=0 THEN LEAVE
  62.             END
  63.       ISONLINE InterfaceName
  64.       status_MW=rc
  65.       SIGNAL ON ERROR
  66.  
  67. ADDRESS COMMAND
  68.       IF (rc=0) THEN
  69.       DO
  70.         'RequestChoice >NIL: "ToT-Message" "The interface name in the rexx-script GenesisOnline.rexx is wrong!" "Ok"'
  71.         'SetEnv ToT:Data/TOT_ONLINE -3'            /* Fehler beim LogIn              */
  72.       END
  73.         ELSE 'SetEnv ToT:Data/TOT_ONLINE 2'
  74.     END
  75.     ELSE ADDRESS COMMAND 'SetEnv ToT:Data/TOT_ONLINE 3'/* Genesis war schon Online !          */
  76.  
  77.     EXIT
  78.  
  79. ERROR:
  80. ADDRESS COMMAND
  81.     'SetEnv ToT:Data/TOT_ONLINE -1'                /* Message : Found Miami              */
  82.     EXIT    
  83.  
  84. /******************************************************************************************************/
  85. /* Erklärung zu den Env-Variablen                                                                     */
  86. /*     TOT_ONLINE                                                                     */
  87. /*                                                                                      */
  88. /*    -3=Fehler beim Genesis-Login                                              */
  89. /*    -2=Konnte Genesis-Port nicht finden                                      */
  90. /*    -1=Fehler im Script                                                      */
  91. /*       0=Genesis-Port wurde nicht gefunden                                                          */
  92. /*       1=Genesis-Port gefunden und Script versucht online zu gehen                                  */
  93. /*     2=Genesis ist online                                                                           */
  94. /*     3=Genesis war schon online !                                                                  */
  95. /*                                                                                                    */
  96. /******************************************************************************************************/
  97.